﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Tycho.Runtime;

namespace Tycho.Peyote {
    /// <summary>
    /// Interaction logic for IntegerGlyph.xaml
    /// </summary>
    public partial class IntegerGlyph : UserControl {
        AnyObject Integer;

        public IntegerGlyph (AnyObject integer) {
            InitializeComponent ();

            Integer = integer;
            NumberBox.Text = Integer.ToString ();
        }
    }

    public class IntegerPresenter : GlyphPresenter {
        public IntegerPresenter () : base ("integer", new ValueSchemaObject<int> ()) { }

        public override UIElement Present (AnyObject obj, Environment environent) {
            return new IntegerGlyph (obj);
        }
    }
}
